package com.djzhou.gmms.service.systeminfo.impl;

import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Service;

import com.djzhou.gmms.model.entity.PageBean;
import com.djzhou.gmms.model.systeminfo.TbSystemInfo;
import com.djzhou.gmms.model.user.VoResource;
import com.djzhou.gmms.service.base.impl.BaseServiceImpl;
import com.djzhou.gmms.service.systeminfo.SystemInfoService;


public class SystemInfoServiceImpl extends BaseServiceImpl implements SystemInfoService {

	@Override
	public void add(TbSystemInfo t) {
		systemInfoDAO.insert(t);
	}

	@Override
	public void delete(Integer id) {
		systemInfoDAO.delete(TbSystemInfo.class, id);
	}

	@Override
	public TbSystemInfo queryById(Integer id) {
		return systemInfoDAO.queryByID(TbSystemInfo.class, id);
	}

	@Override
	public List<TbSystemInfo> queryList(HashMap<String, Object> hashMap) {
		return null;
	}

	@Override
	public PageBean<TbSystemInfo> queryPageBean(
			HashMap<String, Object> hashMap, int pageSize, int currentPage) {
		return null;
	}

	@Override
	public void update(TbSystemInfo t) {
		systemInfoDAO.update(t);		
	}

	@Override
	public Integer queryId() {
		String hql="from TbSystemInfo";
		List<TbSystemInfo> list=systemInfoDAO.query(hql);
		return list!=null && list.size()!=0?list.get(0).getSystemId():1;
	}
	@Override
	public VoResource query4AutoComplete(HashMap<String, Object> hashMap, String sidx,
			String sord, int pageSize, int currentPage) {
		// TODO Auto-generated method stub
		return null;
	}

}
